Type CB3DMaterial
	
	Field B3dBrush:TBrush
	Field Cmat:CalCoreMaterial
	Field flags:Int
	Field diffuse:Int[3]
	Field matid:Int
	Field isloaded:Byte = False
	Field filename:String
	Field name:String
	Field maps:TList
	
	Method New()
		B3dBrush = TBrush.CreateBrush(255,255,255)
		diffuse[0] = 255
		diffuse[1] = 255
		diffuse[2] = 255
		maps = New TList
		matid = 0
		name = "blank"
		'DebugLog "Mat Created"
	End Method	
	
	Method AddMap(map:CB3DTexture,id:Int)
		'DebugLog "added: "+map.tex.ToString()+" id: "+id
		B3dBrush.BrushTexture(map.tex,0,id)
		map.id = id
		map.parentmat = Self
		maps.AddLast(map)
	
	End Method
	
End Type


Type CB3DTexture
	Field tex:TTexture
	Field name:String
	Field blend:Int=2
	Field id:Int
	Field uvset:Int
	Field parentmat:CB3DMaterial
End Type
